<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Replacing</title>

</HEAD>
<BODY BGCOLOR="#ffffff">
<h3>
Replacing</h3>
<p CLASS="Head">
Suppose after further reflection we realize that the version of file1.txt that we just
received is incorrect and in fact we want an earlier version.
You can replace a workbench resource with a versioned resource of the same name from the repository. To rollback to an
earlier version we can&nbsp; proceed as follows:</p>
<TABLE BORDER="0" cellspacing="0" cellpadding="3">
<THEAD>
</THEAD>
<TBODY>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
1.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
In the Navigator view select the file1.txt</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
2.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
From the file's context menu, select Replace With &gt; Version...</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
3.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
In the Replace With Version in Repository dialog, choose the original (bottom-most) version and
click the Replace button.</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<b>4.</b>
</TD>
<TD valign="top" align="left">
Choose Show Version Info from the Navigator view pull-down menu
<p><img align="texttop" border="0" src="../images/Image84_replace_info.jpg" width="341" height="133"></p>
<p>Observe that the Navigator indicates that our project JanesTeamProject is
associated with the HEAD stream (see #1). In addition the &quot;&gt;&quot; (see
#2) indicator lets us know that we have changed file1.txt (by replacing it with the
earlier version).&nbsp;</p>
<p><img align="texttop" border="0" src="../images/Image84_replace2.jpg" width="198" height="105">
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<b>5.</b>
</TD>
<TD valign="top" align="left">
Now that we have finished our coffee we realize that this older version is not
as good as it initially seemed and in fact the version in the stream is better
after all.&nbsp;
<p>Instead of choosing Team &gt; Synchronize with Stream to catch up to the
stream let's choose Replace With &gt; Stream Contents.&nbsp;</p>
<p>Observe that file1.txt is updated to be the contents from the stream, and
that the leading indicator &quot;&gt;&quot; has been removed since we now have
the same version as the stream.
</TD>
</TR>
</TBODY>
</TABLE>
<P>We have seen how to synchronize with the stream, replace with versions from
the stream or the repository. You can also compare with these versions in a
similar manner by choosing the&nbsp; Compare With menu operation from a resource's
context menu in the Navigator.
</P>


<P>&nbsp;&nbsp;<br>
<img align="texttop" src = ../ngibmcpy.gif width="195" height="12">
</P>


</BODY>
</HTML>
